package utils;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;

public class ClientGenerator {
	public static final int NUM_OF_CLIENTS = 30;
	public static final int KEY_LENGTH = 16;
	public static void main(String[] args) {
		try {
			FileWriter fw = new FileWriter("StaticClientList");
			Random r = new Random();
			for(int i = 0; i < NUM_OF_CLIENTS; i ++) {
				byte[] key = new byte[KEY_LENGTH];
				for(int j = 0; j < key.length; j ++) {
					key[j] = (byte) (r.nextInt(26)+97);
				}
				String s = "" + i + " " + new String(key) + "\n";
				fw.write(s);
				fw.flush();
			}
			fw.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
